<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="6" :sm="8">
            <a-form-item label="筛选条件1222">
              <a-input placeholder="请输入筛选条件1222" v-model="queryParam.fxjOut01"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8">
            <a-form-item label="筛选条件2">
              <a-input placeholder="请输入筛选条件2" v-model="queryParam.fxjOut02"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件3">
                <a-input placeholder="请输入筛选条件3" v-model="queryParam.fxjOut03"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件4">
                <a-input placeholder="请输入筛选条件4" v-model="queryParam.fxjOut04"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件5">
                <a-input placeholder="请输入筛选条件5" v-model="queryParam.fxjOut05"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件6">
                <a-input placeholder="请输入筛选条件6" v-model="queryParam.fxjOut06"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件7">
                <a-input placeholder="请输入筛选条件7" v-model="queryParam.fxjOut07"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件8">
                <a-input placeholder="请输入筛选条件8" v-model="queryParam.fxjOut08"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件9">
                <a-input placeholder="请输入筛选条件9" v-model="queryParam.fxjOut09"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="筛选条件10">
                <a-input placeholder="请输入筛选条件10" v-model="queryParam.fxjOut10"></a-input>
              </a-form-item>
            </a-col>
          </template>
          <a-col :md="6" :sm="8" >
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('订单管理')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
      </a-dropdown>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>

      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{fixed:true,selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        :scroll="tableScroll"
        @change="handleTableChange">

        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无此图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt="图片不存在" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无此文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="uploadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>

          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>

      </a-table>
    </div>

    <buse3Data01-modal ref="modalForm" @ok="modalFormOk"></buse3Data01-modal>
  </a-card>
</template>

<script>

  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import Buse3Data01Modal from './modules/Buse3Data01Modal'

  export default {
    name: "Buse3Data01List",
    mixins:[JeecgListMixin],
    components: {
      Buse3Data01Modal
    },
    data () {
      return {
        description: '订单管理管理页面',
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'创建人名称',
            align:"center",
            dataIndex: 'createName'
          },
          {
            title:'创建人登录名称',
            align:"center",
            dataIndex: 'createBy'
          },
          {
            title:'创建日期',
            align:"center",
            dataIndex: 'createDate',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            }
          },
          {
            title:'更新人名称',
            align:"center",
            dataIndex: 'updateName',
            scopedSlots: {customRender: 'imgSlot'}
          },
          {
            title:'更新人登录名称',
            align:"center",
            dataIndex: 'updateBy'
          },
          {
            title:'更新日期',
            align:"center",
            dataIndex: 'updateDate',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            }
          },
          {
            title:'所属部门',
            align:"center",
            dataIndex: 'sysOrgCode'
          },
          {
            title:'所属公司',
            align:"center",
            dataIndex: 'sysCompanyCode'
          },
          {
            title:'流程状态',
            align:"center",
            dataIndex: 'bpmStatus'
          },
          {
            title:'筛选条件1222',
            align:"center",
            dataIndex: 'fxjOut01'
          },
          {
            title:'筛选条件2',
            align:"center",
            dataIndex: 'fxjOut02'
          },
          {
            title:'筛选条件3',
            align:"center",
            dataIndex: 'fxjOut03'
          },
          {
            title:'筛选条件4',
            align:"center",
            dataIndex: 'fxjOut04'
          },
          {
            title:'筛选条件5',
            align:"center",
            dataIndex: 'fxjOut05'
          },
          {
            title:'筛选条件6',
            align:"center",
            dataIndex: 'fxjOut06'
          },
          {
            title:'筛选条件7',
            align:"center",
            dataIndex: 'fxjOut07'
          },
          {
            title:'筛选条件8',
            align:"center",
            dataIndex: 'fxjOut08'
          },
          {
            title:'筛选条件9',
            align:"center",
            dataIndex: 'fxjOut09'
          },
          {
            title:'筛选条件10',
            align:"center",
            dataIndex: 'fxjOut10'
          },
          {
            title:'无筛选条件11',
            align:"center",
            dataIndex: 'fxjOut11'
          },
          {
            title:'无筛选条件12',
            align:"center",
            dataIndex: 'fxjOut12'
          },
          {
            title:'无筛选条件13',
            align:"center",
            dataIndex: 'fxjOut13'
          },
          {
            title:'无筛选条件14',
            align:"center",
            dataIndex: 'fxjOut14'
          },
          {
            title:'无筛选条件15',
            align:"center",
            dataIndex: 'fxjOut15'
          },
          {
            title:'无筛选条件16',
            align:"center",
            dataIndex: 'fxjOut16'
          },
          {
            title:'无筛选条件17',
            align:"center",
            dataIndex: 'fxjOut17'
          },
          {
            title:'无筛选条件18',
            align:"center",
            dataIndex: 'fxjOut18'
          },
          {
            title:'无筛选条件19',
            align:"center",
            dataIndex: 'fxjOut19'
          },
          {
            title:'无筛选条件20',
            align:"center",
            dataIndex: 'fxjOut20'
          },
          {
            title:'无筛选条件62',
            align:"center",
            dataIndex: 'fxjOut62'
          },
          {
            title:'无筛选条件63',
            align:"center",
            dataIndex: 'fxjOut63'
          },
          {
            title:'无筛选条件64',
            align:"center",
            dataIndex: 'fxjOut64'
          },
          {
            title:'无筛选条件22',
            align:"center",
            dataIndex: 'fxjOut21',
            scopedSlots: {customRender: 'imgSlot'}
          },
          {
            title:'无筛选条件65',
            align:"center",
            dataIndex: 'fxjOut65',
            scopedSlots: {customRender: 'fileSlot'}
          },
          {
            title:'无筛选条件60',
            align:"center",
            dataIndex: 'fxjOut60'
          },
          {
            title:'无筛选条件61',
            align:"center",
            dataIndex: 'fxjOut61'
          },
          {
            title:'无筛选条件26',
            align:"center",
            dataIndex: 'fxjOut26'
          },
          {
            title:'无筛选条件27',
            align:"center",
            dataIndex: 'fxjOut27'
          },
          {
            title:'无筛选条件28',
            align:"center",
            dataIndex: 'fxjOut28'
          },
          {
            title:'无筛选条件29',
            align:"center",
            dataIndex: 'fxjOut29'
          },
          {
            title:'无筛选条件21',
            align:"center",
            dataIndex: 'fxjOut22'
          },
          {
            title:'无筛选条件66',
            align:"center",
            dataIndex: 'fxjOut66'
          },
          {
            title:'无筛选条件23',
            align:"center",
            dataIndex: 'fxjOut23'
          },
          {
            title:'无筛选条件67',
            align:"center",
            dataIndex: 'fxjOut67'
          },
          {
            title:'无筛选条件24',
            align:"center",
            dataIndex: 'fxjOut24'
          },
          {
            title:'无筛选条件68',
            align:"center",
            dataIndex: 'fxjOut68'
          },
          {
            title:'无筛选条件25',
            align:"center",
            dataIndex: 'fxjOut25'
          },
          {
            title:'无筛选条件69',
            align:"center",
            dataIndex: 'fxjOut69'
          },
          {
            title:'无筛选条件73',
            align:"center",
            dataIndex: 'fxjOut73'
          },
          {
            title:'无筛选条件30',
            align:"center",
            dataIndex: 'fxjOut30'
          },
          {
            title:'无筛选条件74',
            align:"center",
            dataIndex: 'fxjOut74'
          },
          {
            title:'无筛选条件31',
            align:"center",
            dataIndex: 'fxjOut31'
          },
          {
            title:'无筛选条件75',
            align:"center",
            dataIndex: 'fxjOut75'
          },
          {
            title:'无筛选条件32',
            align:"center",
            dataIndex: 'fxjOut32'
          },
          {
            title:'无筛选条件76',
            align:"center",
            dataIndex: 'fxjOut76'
          },
          {
            title:'无筛选条件70',
            align:"center",
            dataIndex: 'fxjOut70'
          },
          {
            title:'无筛选条件71',
            align:"center",
            dataIndex: 'fxjOut71'
          },
          {
            title:'无筛选条件72',
            align:"center",
            dataIndex: 'fxjOut72'
          },
          {
            title:'无筛选条件37',
            align:"center",
            dataIndex: 'fxjOut37'
          },
          {
            title:'无筛选条件38',
            align:"center",
            dataIndex: 'fxjOut38'
          },
          {
            title:'无筛选条件39',
            align:"center",
            dataIndex: 'fxjOut39'
          },
          {
            title:'无筛选条件33',
            align:"center",
            dataIndex: 'fxjOut33'
          },
          {
            title:'无筛选条件77',
            align:"center",
            dataIndex: 'fxjOut77'
          },
          {
            title:'无筛选条件34',
            align:"center",
            dataIndex: 'fxjOut34'
          },
          {
            title:'无筛选条件78',
            align:"center",
            dataIndex: 'fxjOut78'
          },
          {
            title:'无筛选条件35',
            align:"center",
            dataIndex: 'fxjOut35'
          },
          {
            title:'无筛选条件79',
            align:"center",
            dataIndex: 'fxjOut79'
          },
          {
            title:'无筛选条件36',
            align:"center",
            dataIndex: 'fxjOut36'
          },
          {
            title:'无筛选条件40',
            align:"center",
            dataIndex: 'fxjOut40'
          },
          {
            title:'无筛选条件41',
            align:"center",
            dataIndex: 'fxjOut41'
          },
          {
            title:'无筛选条件42',
            align:"center",
            dataIndex: 'fxjOut42'
          },
          {
            title:'无筛选条件43',
            align:"center",
            dataIndex: 'fxjOut43'
          },
          {
            title:'无筛选条件80',
            align:"center",
            dataIndex: 'fxjOut80'
          },
          {
            title:'无筛选条件48',
            align:"center",
            dataIndex: 'fxjOut48'
          },
          {
            title:'无筛选条件49',
            align:"center",
            dataIndex: 'fxjOut49'
          },
          {
            title:'无筛选条件44',
            align:"center",
            dataIndex: 'fxjOut44'
          },
          {
            title:'无筛选条件45',
            align:"center",
            dataIndex: 'fxjOut45'
          },
          {
            title:'无筛选条件46',
            align:"center",
            dataIndex: 'fxjOut46'
          },
          {
            title:'无筛选条件47',
            align:"center",
            dataIndex: 'fxjOut47'
          },
          {
            title:'无筛选条件51',
            align:"center",
            dataIndex: 'fxjOut51'
          },
          {
            title:'无筛选条件52',
            align:"center",
            dataIndex: 'fxjOut52'
          },
          {
            title:'无筛选条件53',
            align:"center",
            dataIndex: 'fxjOut53'
          },
          {
            title:'无筛选条件54',
            align:"center",
            dataIndex: 'fxjOut54'
          },
          {
            title:'无筛选条件50',
            align:"center",
            dataIndex: 'fxjOut50'
          },
          {
            title:'无筛选条件59',
            align:"center",
            dataIndex: 'fxjOut59'
          },
          {
            title:'无筛选条件55',
            align:"center",
            dataIndex: 'fxjOut55'
          },
          {
            title:'无筛选条件56',
            align:"center",
            dataIndex: 'fxjOut56'
          },
          {
            title:'无筛选条件57',
            align:"center",
            dataIndex: 'fxjOut57'
          },
          {
            title:'无筛选条件58',
            align:"center",
            dataIndex: 'fxjOut58'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/buse/buse3Data01/list",
          delete: "/buse/buse3Data01/delete",
          deleteBatch: "/buse/buse3Data01/deleteBatch",
          exportXlsUrl: "/buse/buse3Data01/exportXls",
          importExcelUrl: "buse/buse3Data01/importExcel",
        },
        dictOptions:{
        },
        tableScroll:{x :89*147+50}
      }
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      }
    },
    methods: {
      initDictConfig(){
      }
       
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>